﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>添加群组织</title>
		<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
		<link href="css/table.css" rel="stylesheet" type="text/css" />
		<style type="text/css">
			body{FONT-FAMILY: 宋体;FONT-SIZE: 12px;}
		</style>
		<script type="text/javascript">
			function addgroup(){
				var name =$("#groupName").val();
				if($.trim(name)==''){
					alert("名称不能为空！");
					return;
				}
				if(name.length>15){
				   alert("不能超过15个字符");
				   return;
				}
				var add ={"groupname":name};
				$.post("groupName.action",add,function(data){
					if(data=='success'){
						window.opener.location.reload();
						window.close();
					}else{
						alert("添加失败！");
					}
				});
			}
		</script>
	</head>
	<body>
		<table align="center" style="width:450px" class="righ_list" frame="box" cellspacing="1" cellpadding="0"   border="0">
			<tr ><td class="reigh_list2" align="center">组织</td></tr>
			<tr style="background: #ffffff">
				<td align="left">
					添加组织名称：<input id="groupName" type="text" width="100px" height="30px" />
				</td>
			</tr >
			<tr style="background: #ffffff">
				<td  align="center">
					<input class="button_02" onclick="addgroup()" type="button" value="确定" />
				</td>
			</tr>
		</table>
	</body>
</html>